import axios from '@/libs/api.request'
import fileAxios from '@/libs/file.request';
//代理商列表
export const apiAgentList = data => {
    return axios.request({
      url: '/agent/list',
      method: 'post',
      data
    })
  }
  //改变推广状态
  export const apiAgentChangeReferStatus = data => {
    return axios.request({
      url: '/agent/change-refer-status',
      method: 'post',
      data
    })
  }

  //详情
  export const apiAgentInfo = data => {
    return axios.request({
      url: `/agent/info/${data.id}`,
      method: 'post',
      data
    })
  }

  //保存
  export const apiAgentSave = data => {
    return axios.request({
      url: '/agent/save',
      method: 'post',
      data
    })
  }
  //删除
  export const apiAgentDelete = data => {
    return axios.request({
      url: '/agent/delete',
      method: 'post',
      data
    })
  }
    // /用户导出
export const apiAgentExport = data => {
  return fileAxios.request({
    url: '/agent/export',
    method: 'get',
    data
  }, { responseType: 'blob' });
}
